<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:a4j="http://richfaces.org/a4j"
	xmlns:rich="http://richfaces.org/rich"
	template="/WEB-INF/template/template.xhtml">
	<ui:define name="body">

		<h:form>
			<div class="body_center_100">
				<rich:panel>
					<f:facet name="header">
						<h:outputLabel
							style="font-weight: bold;
	color: #B90000; font-weight: bold;">ANUNCIE</h:outputLabel>
					</f:facet>

					<h:panelGrid columns="2" style="margin: 0 auto;"
						columnClasses="width:100%;">
						<h:outputLabel value="Nome*:" />
						<h:inputText title="Nome" size="50" maxlength="100"
							value="#{anuncieMB.anuncio.nome}" />
						<h:outputLabel value="Email*:" />
						<h:inputText title="Email" size="50" maxlength="70"
							value="#{anuncieMB.anuncio.email}"
							validatorMessage="Email informado não é valido">
							<f:validateRegex
								pattern="^[_A-Za-z0-9-\+]+(\.[_A-Za-z0-9-]+)*@[A-Za-z0-9-]+(\.[A-Za-z0-9]+)*(\.[A-Za-z]{2,})$" />
						</h:inputText>
						<h:outputLabel value="CNPJ:" />
						<h:inputText title="CNPJ" size="20" maxlength="20"
							value="#{anuncieMB.anuncio.cnpj}" />
						<h:outputLabel value="Telefone:" />
						<h:inputText id="inputTelefone" title="Telefone" size="20"
							maxlength="20" value="#{anuncieMB.anuncio.telefone}">
						</h:inputText>
						<h:outputLabel value="Outro Telefone:" />
						<h:inputText title="Outro Telefone" size="20" maxlength="20"
							value="#{anuncieMB.anuncio.outroTelefone}">
						</h:inputText>
						<h:outputLabel value="Site:" />
						<h:inputText title="Site" size="50" maxlength="50"
							value="#{anuncieMB.anuncio.site}" />
						<h:outputLabel value="Mensagem*:" />
						<h:inputTextarea cols="50" rows="10" value="#{anuncieMB.anuncio.mensagem}"></h:inputTextarea>

						<h:commandButton value="Enviar" action="#{anuncieMB.salvar}"></h:commandButton>
					</h:panelGrid>

				</rich:panel>
			</div>
		</h:form>
	</ui:define>
</ui:composition>